Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Polylines

Figure 5 shows a polyline.

Figure 5 A polyline

Labels

ASCII
Polyline
Binary
plin ( = 0x706C696E )

Data Format

Uns32               numVertices
Point3D             vertices[numVertices]
numVertices
The number of vertices of the polyline.
vertices[]
An array of vertices that define the polyline.

Data Size

4 + (numVertices * 12)

Description

A polyline is a collection of n lines defined by the n +1 points that define the vertices of its segments. For 1£ i £ n -1, the second vertex of the ith line is the first vertex of the i +1st line; the n +1st vertex of a polyline is not connected to the first. Attributes may be assigned separately to each vertex and to each segment of a polyline as well as to the entire polyline.

Default Surface Parameterization

None.

Parent Hierarchy

Shared, shape, geometry.

Parent Objects

None.

Child Objects

Attribute set, geometry attribute set list, vertex attribute set list. Use a vertex attribute set list to assign attribute sets to as many vertices as desired; use a geometry attribute set list to assign attribute sets to as many segments as desired. Use an attribute set to assign attributes to the entire polyline.

Example

PolyLine(               
    5                   #numVertices
    0   0   0           #first vertex
    1   1   0           #second vertex
    .5  .5  0
    0   1   0
    1   1   0
)

Default Size

None.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |